A countdown, in frames: set alarm[n] (n is 0-11) to a frame count, and the matching Alarm n event runs the frame it reaches exactly 0.
alarm: array<int>[0..11]Twelve independent countdown timers every instance already has, indexed alarm[0] through alarm[11]. Setting one to a positive number of frames starts it counting down by exactly 1 every Step; the moment it reaches exactly 0, the matching Alarm event (Alarm 0 through Alarm 11, one per index) runs once, automatically, the same frame.
0 means inactive - not a negative sentinel - so an alarm that has never been set, or that has already fired, simply sits at 0 doing nothing, at no cost. An alarm set from an Alarm event, in the same instance or in another one, counts from the next Step, whatever its number (alarm[2] = 1; inside Alarm 1's event runs Alarm 2 one Step later) - Events has the details. An alarm does not repeat itself: its event firing does not re-arm it, which is what makes re-arming an ordinary assignment inside the event itself, free to be a different value every time (a turret that fires faster as a fight goes on just assigns a smaller delay each time). See Events for the full picture, with a worked example, and The order of a frame for exactly when alarms are checked relative to button events and Step.
alarm[0] = 45;Starts alarm 0 counting down from 45 frames; its own objects/<this object>/alarm_0.gbml event runs once, 45 frames later.
0 means inactive (not a negative sentinel) - the countdown does nothing at 0 beyond just sitting there, so an object can leave every alarm at 0 for free.